package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`comment`")
public class Comment extends BaseEntity implements Serializable {
    /**
     * 评论id
     */
    @TableId(value = "COMMENT_ID", type = IdType.AUTO)
    private Integer commentId;

    /**
     * 用户id
     */
    @TableField(value = "USER_ID")
    private Integer userId;

    @TableField(value = "MERCHANT_ID")
    private Integer merchantId;
    /**
     * 头像
     */
    @TableField(exist = false)
    private String userPhoto;
	/**
	 * 商品图片
	 */
	@TableField(exist = false)
	private String spuBigimg;
    /**
     * 用户名
     */
    @TableField(exist = false)
    private String userName;
    /**
     * 手机号
     */
    @TableField(exist = false)
    private String userPhotoNumber;
    /**
     * 商品id
     */
    @TableField(value = "SPU_ID")
    private Integer spuId;

    /**
     * 评论内容
     */
    @TableField(value = "COMMENT_CONTENT")
    private String commentContent;

    /**
     * 评论时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "COMMENT_TIME")
    private Date commentTime;

    /**
     * 商品评分
     */
    @TableField(value = "SPU_GRADE")
    private Byte spuGrade;

    /**
     * 店铺服务评分
     */
    @TableField(value = "MERCHANT_SERVE_CRADE")
    private Integer merchantServeCrade;

    /**
     * 状态（-1.删除 0.默认）
     */
    @TableField(value = "COMMENT_STATUS")
    private Integer commentStatus;

    private static final long serialVersionUID = 1L;

    public static final String COL_COMMENT_ID = "COMMENT_ID";

    public static final String COL_USER_ID = "USER_ID";

    public static final String COL_SPU_ID = "SPU_ID";

    public static final String COL_COMMENT_CONTENT = "COMMENT_CONTENT";

    public static final String COL_COMMENT_TIME = "COMMENT_TIME";

    public static final String COL_SPU_GRADE = "SPU_GRADE";

    public static final String COL_MERCHANT_SERVE_CRADE = "MERCHANT_SERVE_CRADE";

    public static final String COL_COMMENT_STATUS = "COMMENT_STATUS";
}
